<?php

	require_once("component.php");
	//session_start();
	
class edit extends component {
	
	private $value = "edit";
	
	function __construct($uuid) {
		$this->uuid = $uuid;//"uuid39e9e7c11f11c3e0a2f0cac4b2b9f874";
		parent::__construct();
	}
	
	function form() {
		$out = "<input type='edit' value='$this->value' onchange=sendmessage('$this->uuid','onchange',this.value,0);>";
		return $out;
	}
	
	function getmessage($sender, $message, $param1, $param2) {
		//echo $sender;
		if ($message == "onchange") { $this->value = $param1;}
	}
	
	function updateform() {
		
	}
	
	function __invoke() {
		return array("ddd","ffff");
	}
	
	function __toString() {
		return "sdfsdf";
	}
	
}

/*
	$answer = array();
	$_SESSION['answer'] = &$answer;
	
	$controller = new controller();
	$controller->sendmessage($_REQUEST['_receiver'],$_REQUEST['_message'],$_REQUEST['_param1'],$_REQUEST['_param2']);

	echo json_encode($answer);
	unset($answer);
*/
?>
